import akshare as ak

# 获取 A 股列表数据
stock_info_a_code_name_df = ak.stock_info_a_code_name()

# 打印前几行数据查看结果
print(stock_info_a_code_name_df.head())

stock_info_a_code_name_df.to_csv('stock_name.csv')